import $http from '@/utils/request'
let request = ''
if (process.env.NODE_ENV !== 'production') {
  request = $http.sys1
} else {
  request = $http
}
// 登录接口
export function login(username, password) {
  return request({
    url: '/auth/login',
    method: 'post',
    data: {
      username,
      password
    }
  })
}

// 获取用户信息
export function getUserRoutes() {
  return request({
    url: '/api/menus/build',
    method: 'get'
  })
}

// 退出登录
export function logout() {
  return request({
    url: '/auth/logout',
    method: 'delete'
  })
}

